
import java.awt.*;
import java.util.Random;

public class Blood {
	int x, y, w = 15, h = 15;
	private boolean live = true;
	private boolean isStatic;
	private static final Random random = new Random();

	public Blood(int x, int y) {
		this.x = x;
		this.y = y;
		this.isStatic = true;
	}

	public Blood() {
		this.x = random.nextInt(TankClient.GAME_WIDTH - w);
		this.y = random.nextInt(TankClient.GAME_HEIGHT - h);
		this.isStatic = false;
	}

	public void draw(Graphics g) {
		if (!live) return;
		Color c = g.getColor();
		g.setColor(Color.MAGENTA);
		g.fillRect(x, y, w, h);
		g.setColor(c);
	}

	public Rectangle getRect() {
		return new Rectangle(x, y, w, h);
	}

	public boolean isLive() {
		return live;
	}

	public void setLive(boolean live) {
		this.live = live;
	}
}